package LeetCode.LeetCode2;

/**
 * @author lumin
 * @date 2022/03/23 16:46
 **/
public class Num1523 {
    public static int countOdds(int low, int high) {
        if(low % 2 != 0 && high % 2 != 0){
            return ((high - low) / 2 + 1);
        }if(high - low == 1){
            return 1;
        }
        return (high - low) >> 1;
    }

    public static void main(String[] args) {
        System.out.println(countOdds(13,18));
    }
}